/*
 * simplified_svm.h
 *
 *  Created on: Mar 27, 2024
 *      Author: Yiwen Zhu
 */

#ifndef SELF_DEFINE_SIMPLIFIED_SVM_H_
#define SELF_DEFINE_SIMPLIFIED_SVM_H_
#include "my_def.h"

typedef struct 	{ _iq  Ud; 			// Input: reference alpha-axis phase voltage
				  _iq  Uq;			// Input: reference beta-axis phase voltage
				  _iq  Ta;				// Output: reference phase-a switching function
				  _iq  Tb;				// Output: reference phase-b switching function
				  _iq  Tc;				// Output: reference phase-c switching function
				  _iq  Cos;			// Variable: temp variable
				  _iq  Sin;			// Variable: temp variable
				  _iq  Udc;			// Variable: temp variable
				  _iq  KUdc;
				} SIMP_SVM;


/*-----------------------------------------------------------------------------
Default initalizer for the SVGEN object.
-----------------------------------------------------------------------------*/
#define SIMP_SVM_DEFAULTS { 0,0,0,0,0,0,0,0,0 }

void simplified_svpwm_calc(void);


#endif /* SELF_DEFINE_SIMPLIFIED_SVM_H_ */
